package com.yonyou.cyxdms.sysmanage.client.feign;

import com.yonyou.cyxdms.framework.config.FeiginHeaderConfig;
import com.yonyou.cyxdms.sysmanage.client.domains.dto.JPushDTO;
import com.yonyou.cyxdms.sysmanage.client.domains.dto.SmsPushDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(name = "f4push", configuration = FeiginHeaderConfig.class)
public interface F4PushService {

    @PostMapping(value = "/f4push/v1/apps")
    public String apps(@RequestBody JPushDTO jPushDTO, @RequestHeader(value = "appId" ,required = false) String appId);

    @PostMapping(value = "/f4push/v1/smss", produces = "application/json")
    public String sendSms(@RequestBody SmsPushDTO smsPushDTO);
}
